extends GridContainer
# 这是一个GridContainer，用来装所有的棋盘格
func _ready():
	var grid_resource = preload ("res://UI/Grid/Grid.tscn")
	for i in range(Chessboard.BOARD_SIZE):
		for j in range(Chessboard.BOARD_SIZE):
			# 批量实例化Grid
			var new_grid = grid_resource.instantiate()
			add_child(new_grid)
			# 设定Grid的属性coord，让Gird知道自己的坐标
			new_grid.coord = [i , j]
